// config
import { Text, View, Icon, Navigator, Image, Button } from '@tarojs/components';
import './Success.scss';
import src from '../../../static/images/yqhy.png';
import { AtCurtain } from 'taro-ui';
import { useState } from 'react';

const Succeed = () => {
    // 幕帘开启关闭
    const [isOpened, setIsOpened] = useState(false)
    const onClose = () => {
        setIsOpened(!isOpened)
    }

    return <View>
        <View class="container">
            <View class="icon-box" className='icon-box_haed'>
                <Icon class="icon-box-img" type="success" size="93" className='icon-box-img_img'></Icon>
                <View class="icon-box-ctn" className='icon-box-ctn_ctn'>
                    <View class="icon-box-title">拼团成功</View>
                    <View class="icon-box-desc">请查看订单信息并到门店自提并付款</View>
                </View>
            </View>
        </View>
        <View class="button-sp-area">
            <Navigator url='../../wode/Nomention/Noorder'>
                <Button type="primary" plain="true">查看订单</Button>
            </Navigator>

            <Button type="primary" plain="true" onClick={() => setIsOpened(true)}>邀请好友拼团</Button>
        </View>

        <AtCurtain
            isOpened={isOpened}
            onClose={() => onClose(false)}
        >
            <Image
                style='width:100%;height:300px'
                src={src}
            />
        </AtCurtain>
    </View>
}
export default Succeed;